import {
  ElButton,
  ElRow,
  ElContainer,
  ElHeader,
  ElAside,
  ElMain,
  ElTable,
  ElTableColumn,
  ElPopover,
  ElTag,
  ElLoading,
  ElMessage,
  ElMessageBox,
  ElMenu,
  ElMenuItem,
  ElMenuItemGroup,
  ElSubmenu,
  ElIcon,
  ElPagination,
  ElForm,
  ElFormItem,
  ElInput,
  ElSelect,
  ElOption,
  ElOptionGroup,
  ElTimePicker,
  ElSwitch,
  ElDatePicker,
  ElCheckbox,
  ElCheckboxGroup,
  ElRadio,
  ElRadioGroup,
} from "element-plus";

const cList = [
  ElMessageBox,
  ElForm,
  ElFormItem,
  ElInput,
  ElSelect,
  ElOption,
  ElOptionGroup,
  ElTimePicker,
  ElSwitch,
  ElDatePicker,
  ElCheckbox,
  ElCheckboxGroup,
  ElRadio,
  ElRadioGroup,
]

export default (app) => {
  cList.forEach(item => {
    app.use(item);
  })

  app.component(ElButton.name, ElButton);
  app.use(ElIcon);
  app.use(ElSubmenu);
  app.use(ElMenu);
  app.use(ElMenuItemGroup);
  app.use(ElMenuItem);
  app.use(ElRow);
  app.use(ElContainer);
  app.use(ElHeader);
  app.use(ElAside);
  app.use(ElMain);
  app.use(ElTable);
  app.use(ElTableColumn);
  app.use(ElPopover);
  app.use(ElTag);
  app.use(ElLoading);
  app.use(ElPagination);
  // app.use(ElMessage);
  app.config.globalProperties.$message = ElMessage;
};
